<%
Function CMS_CateList(n)
  Dim item,s,arr
  arr = Split(LoadFromFile(ImpBlue_Path("include\CateList.html",""),"utf-8"),",")
  s = ""
  If IsArray(arr) And ubound(arr) >= 0 Then
    For Each item in arr
      Call CMS_CateList_Bulid(s,item,n)
    Next
  End If
  Call SaveToFile(CMS_Path(n,""),s,"utf-8",False)
  Session("batchtime")=Session("batchtime")+RunTime
End Function
Function CMS_CateList_Bulid(ByRef s,ID,n)
  Dim aList,oArticle
  Set aList = CMS_PostList(9,CMS_SQLWhere("CateID",ID))
  Dim i,j
  j=aList.Keys
  Set oArticle=aList.Item(j(0))
  oArticle.Template = n
  oArticle.html = oArticle.Template
  If oArticle.Export(ZC_DISPLAY_MODE_ALL)= True Then
    oArticle.Build
    s = s & oArticle.html
  End If
  Set oArticle = Nothing
  
  For i=0 To aList.Count-1
    Set oArticle=aList.Item(j(i))
    oArticle.Template = n & "_LI"
    oArticle.html = oArticle.Template
    ' oArticle.Intro=CMS_Transfer(oArticle.Intro)
    If oArticle.Export(ZC_DISPLAY_MODE_ALL)= True Then
      oArticle.Build
      s = Replace(s,"<#LI#>",oArticle.html & "<#LI#>")
    End If
    Set oArticle = Nothing
  Next
  Set aList = Nothing
  s = Replace(s,"<#LI#>","")
End Function
%>